package com.hs.sfzy.controller;

import com.github.pagehelper.PageInfo;
import com.hs.sfzy.entity.MyTest;
import com.hs.sfzy.entity.Mynotice;
import com.hs.sfzy.service.MyTestService;
import com.hs.sfzy.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @BelongsProject: sfzyBackEnd
 * @BelongsPackage: com.hs.sfzy.controller
 * @ClassName MyTestController
 * @Author: 陈千鱼不是鱼
 * @CreateTime: 2024-10-28  17:39
 * @Description: TODO
 * @Version: 1.0
 */
@RestController
@RequestMapping("/mytest")
@Api(tags = "我的测试")
@RequiredArgsConstructor
public class MyTestController {

    private final MyTestService myTestService;

    @GetMapping("/page")
    @ApiOperation("分页查询")
    public Result page(
            @RequestParam(required = false, defaultValue = "1") Integer pageNum,
            @RequestParam(required = false, defaultValue = "5") Integer pageSize
    ) {
        PageInfo<MyTest> info = myTestService.page(pageNum,pageSize);

        return Result.success(info);
    }

}
